package com.ruihui.activity.service;

import java.util.Map;

import com.baomidou.mybatisplus.service.IService;
import com.github.pagehelper.PageInfo;
import com.ruihui.activity.pojo.Acgoods;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author cf123
 * @since 2018-09-30
 */
public interface AcgoodsService extends IService<Acgoods> {
	/**
	 * 根据条件查询活动商品集合
	 * @param map
	 * @return
	 */
	public PageInfo<Acgoods> getACgoodsList(Map map);
	/**
	 * 减库存
	 * @param acgoods
	 * @param buyNum
	 * @param id
	 * @return
	 */
	public int acreduceNum(Acgoods acgoods, Integer buyNum, Long id,Long nowdate,Long memberId);
	/**
	 * 恢复库存
	 * @param userid
	 * @param acid
	 * @param buyNum
	 * @return
	 */
	public Acgoods acBackNum(Long userid,Long acid,Integer buyNum);
	/**
	 * 验证活动是否在活动时间内
	 * @param acid
	 * @param id
	 * @param state
	 * @param type
	 * @param nowdate
	 * @return
	 */
	public Acgoods iniacGoods( Long goodsid,  long nowdate,String types);
	
	
}
